import sbt.Keys._

name := "DoubanMovieCrawler"

version := "1.0"

scalaVersion := "2.11.6"

libraryDependencies ++= Seq(
  "ch.qos.logback" % "logback-classic" % "1.1.2",
  "commons-codec" % "commons-codec" % "1.9",
  "com.typesafe.play" %% "play-json" % "2.3.8"
)

//akka
libraryDependencies ++= Seq(
  "com.typesafe.akka" %% "akka-actor" % "2.3.9" withSources(),
  "com.typesafe.akka" %% "akka-slf4j" % "2.3.9",
  "com.typesafe.akka" %% "akka-osgi" % "2.3.9",
  "com.typesafe.akka" %% "akka-testkit" % "2.3.9"
)

//database
libraryDependencies ++= Seq(
  "com.zaxxer" % "HikariCP-java6" % "2.3.7",
  "com.typesafe.slick" % "slick_2.11" % "3.0.0-RC3" withSources(),
  "com.typesafe.slick" % "slick-codegen_2.11" % "3.0.0-RC3",
  "mysql" % "mysql-connector-java" % "5.1.31",
  "org.scala-lang" % "scala-reflect" % scalaVersion.value
)

libraryDependencies += "org.apache.httpcomponents" % "httpclient" % "4.3.5" withSources()

libraryDependencies += "org.jsoup" % "jsoup" % "1.7.2"

//json
libraryDependencies += "com.alibaba" % "fastjson" % "1.2.6" withSources()

// If you need to specify main classes manually, use packSettings and packMain
packSettings

// [Optional] Creating `hello` command that calls org.mydomain.Hello#main(Array[String])
packMain := Map("doubanMovieCrawler" -> "com.neo.sk.Main")

mainClass in assembly := Some("com.neo.sk.Main")

assemblyMergeStrategy in assembly := {
  case PathList("org", "apache", "commons", xs@_*) => MergeStrategy.first
  case PathList("play", "core", "server", xs@_*) => MergeStrategy.first
  case PathList("OSGI-OPT", xs@_*) => MergeStrategy.first
  case "logback.xml" => MergeStrategy.first
  case x =>
    val oldStrategy = (assemblyMergeStrategy in assembly).value
    oldStrategy(x)
}

//assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = false)
    